﻿using System;
using System.Collections.Generic;
using Talented.Core.Entities.Talents.Stats.Abstract;
using System.Linq;

namespace Talented.Core.Entities.Talents.Stats
{
	public class StatCollection
	{
		protected List<StatBase> Stats { get; set; }

		public StatCollection()
		{
			Stats = new List<StatBase>();
		}

		public StatCollection(IEnumerable<StatBase> stats)
			: this()
		{
			Stats.AddRange(stats);
		}

		public bool TryAddStat(StatBase stat)
		{
			if (stat == null)
				throw new ArgumentNullException("stat");

			if (Stats.Any(x => x.Position == stat.Position))
				return false;

			Stats.Add(stat);
			return true;
		}

		public Dictionary<StatEnum, double> Calculate()
		{
			
		}

		public List<StatBase> Update()
		{
			
		}
	}
}
